package com.Threecharacters.inherit_.ExtendsExercise;

public class ExtendsExercise1 {
    public static void main(String[] args) {
        B b = new B();

    }
}

class A{
    A(){//构造器
        System.out.println("A");
    }
    A(String name){
        System.out.println("A name");
    }
}

class B extends A{
    B(){
        this("abc");//调用了A(String name)构造器
        System.out.println("B");
    }
    B(String name){
        System.out.println("B name");
    }
}
